#include "krect.h"

KRect::KRect()
{
}

void KRect::OnLButtonDown(QGraphicsSceneMouseEvent *event)
{
    setRect(QRectF(event->scenePos(), QSizeF(0, 0)));
}

void KRect::OnLButtonDblClk(QGraphicsSceneMouseEvent *event)
{

}

void KRect::OnLButtonUp(QGraphicsSceneMouseEvent *event)
{
    QRectF r(rect().topLeft(),
             QSizeF(event->scenePos().x() - rect().topLeft().x(), event->scenePos().y() - rect().topLeft().y()));
    setRect(r);
}

void KRect::OnMouseMove(QGraphicsSceneMouseEvent *event)
{

}

void KRect::OnEditProperties()
{

}

void KRect::OnCancel()
{

}


